# -*- coding:utf-8 -*-
# 装饰器

import time

def timer(func):
    def deco(*args, **kwargs):
        time_start = time.time()
        func(*args, **kwargs)
        time_end = time.time()
        print(time_end - time_start)

    return deco

@timer
def test():
    print('in test')

def test2(name) :
    print('%s in test2'%name)


test()
test2('GC')